<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>教师添加</title>
    <!-- 自定义 favicon -->
    <!--	th:href="@{/asserts/img/favicon.ico}"-->
    <link rel="icon" href="/asserts/img/favicon.png"  type="image/png">
    <!-- Bootstrap core CSS -->
    <link href="asserts/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="asserts/css/dashboard.css" th:href="@{/helps/css/bottom.css}" rel="stylesheet">
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }
        .form-container {
            max-width: 600px;
            margin: 20px auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 10px;
            background-color: #e9f3e9;
        }
        .form-group.row {
            margin-bottom: 15px;
        }
        .form-check-inline {
            display: flex;
            align-items: center;
        }
        .form-check-input,
        .form-check-label{
            margin-right: 10px;
        }
        .btn-custom {
            background-color: #99b99a;
            border-color: #aecaaf;
            color: #fff;
            width: auto;
        }
        .btn-custom:hover {
            background-color: #689969;
            border-color: #86bd88;
        }
        .form-title {
            text-align: center;
            margin-bottom: 20px;
        }
    </style>
</head>

<body>
<!--引入抽取的topbar-->
<!--模板名：会使用thymeleaf的前后缀配置规则进行解析-->
<div th:replace="commons/admbar::topbar"></div>

<div class="container-fluid">
    <div class="row">
        <!--引入侧边栏-->
        <div th:replace="commons/admbar::#sidebar(activeUri='tea')"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="form-container">
                <form th:action="@{/adm/teaAdd}" method="post">
                    <!-- 提示框 -->
                    <div class="alert alert-danger" role="alert" th:if="${errors!=null}">
                        <div th:each="error : ${errors}">
                            <div th:text="${error.msg}"></div>
                        </div>
                    </div>
                    <h5 class="form-title">增加老师</h5>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">工号</label>
                        <div class="col-sm-10">
                            <input name="teaId" type="text" class="form-control" placeholder="请输入工号" th:value="${tea!=null}?${tea.teaId}">
                        </div>
                    </div>

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">姓名</label>
                        <div class="col-sm-10">
                            <input name="teaName" type="text" class="form-control" placeholder="请输入姓名" th:value="${tea!=null}?${tea.teaName}">
                        </div>
                    </div>

<!--                    <div class="form-group row">-->
<!--                        <label class="col-sm-2 col-form-label">班级</label>-->
<!--                        <div class="col-sm-10">-->
<!--                            <select  class="form-control" name="stuClass">-->
<!--                                <option th:selected="${stu!=null} ? ${class.className eq stu.getStuClass()}" th:each="class : ${classes}" th:value="${class.className}" th:text="${class.className}">1</option>-->
<!--                            </select>-->
<!--                        </div>-->
<!--                    </div>-->

                    <div class="form-group row">
                        <label class="col-sm-2 col-form-label">性别</label>
                        <div class="col-sm-10">
                            <div class="form-check form-check-inline">
                                <input class="form-check-input" type="radio" name="teaSex" value="1" th:checked="${tea!=null}?${tea.teaSex eq '1'}">
                                <label class="form-check-label" >男</label>
<!--                            </div>-->
<!--                            <div class="form-check form-check-inline">-->
                                <input class="form-check-input" type="radio" name="teaSex" value="0" th:checked="${tea!=null}?${tea.teaSex eq '0'}">
                                <label class="form-check-label" >女</label>
                            </div>
                        </div>
                    </div>

                    <div class="form-group row">
                        <label  class="col-sm-2 col-form-label">电话</label>
                        <div class="col-sm-10">
                            <input name="teaTele" type="text" class="form-control" placeholder="请输入电话号码" th:value="${tea!=null}?${tea.teaTele}">
                        </div>
                    </div>

                    <div class="form-group row">
                        <div class="col-sm-2"></div>
                        <div class="col-sm-10">
                            <button type="submit" class="btn btn-custom">添加</button>
                        </div>
                    </div>
                </form>
            </div>
<!--            <form th:action="@{/adm/teaAdd}" method="post">-->
<!--                &lt;!&ndash;提示框 &ndash;&gt;-->
<!--                <div class="alert alert-danger" role="alert" th:if="${errors!=null}">-->
<!--                    <div th:text="${error.msg}" th:each="error:${errors}"></div>-->
<!--                </div>-->

<!--                <div class="form-group">-->
<!--                    <label>工号</label>-->
<!--                    <input name="teaId" type="text" class="form-control" placeholder="请输入工号" th:value="${tea!=null}?${tea.teaId}">-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label>姓名</label>-->
<!--                    <input name="teaName" type="text" class="form-control" placeholder="请输入姓名" th:value="${tea!=null}?${tea.teaName}">-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label>性别</label><br/>-->
<!--                    <div class="form-check form-check-inline">-->
<!--                        <input class="form-check-input" type="radio" name="teaSex" value="1" th:checked="${tea!=null}?${tea.teaSex eq '1'}">-->
<!--                        <label class="form-check-label">男</label>-->
<!--                    </div>-->
<!--                    <div class="form-check form-check-inline">-->
<!--                        <input class="form-check-input" type="radio" name="teaSex" value="0" th:checked="${tea!=null}?${tea.teaSex eq '0'}">-->
<!--                        <label class="form-check-label">女</label>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="form-group">-->
<!--                    <label>电话</label>-->
<!--                    <input name="teaTele" type="text" class="form-control" placeholder="请输入电话号码" th:value="${tea!=null}?${tea.teaTele}">-->
<!--                </div>-->
<!--                <button type="submit" class="btn btn-primary" >添加</button>-->
<!--            </form>-->
        </main>
    </div>
</div>
<script type="text/javascript" src="/helps/js/jquery-3.7.1.min.js" ></script>
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script type="text/javascript" src="/plugins/bootstrap-4.0.0/js/bootstrap.min.js" ></script>

<!-- Icons -->
<script type="text/javascript" src="/helps/js/feather.min.js" ></script>
<script>
    feather.replace();
</script>

</body>

</html>